home *** CD-ROM | disk | FTP | other *** search
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- #include "shared.fx"
-
- //------------------------------------------------------------------------------------------------------
- //- Static parameters
- //------------------------------------------------------------------------------------------------------
-
- //common things
- texture SourceTexture1;
-
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
-
- struct VS_PostProcess_Input
- {
- float4 Position : POSITION;
- float2 DiffuseUv : TEXCOORD0;
- };
-
- //------------------------------------------------------------------------------------------------------
-
- struct VS_PostProcess_Output
- {
- float4 Position : POSITION;
- float2 DiffuseUv : TEXCOORD0;
- };
-
-
- //------------------------------------------------------------------------------------------------------
- // VERTEX SHADERS DECLARATIONS
- //------------------------------------------------------------------------------------------------------
- VS_PostProcess_Output VSBase(const VS_PostProcess_Input input);
-
- //------------------------------------------------------------------------------------------------------
- // VERTEX SHADERS IMPLEMENTATIONS
- //------------------------------------------------------------------------------------------------------
-
- //------------------------------------------------------------------------------------------------------
- // VS_PostProcess_Output VSBase(const VS_PostProcess_Input input);
- //
- // simple position + uv transfer (UV correction is applied though)
- //------------------------------------------------------------------------------------------------------
- VS_PostProcess_Output VSBase(const VS_PostProcess_Input input)
- {
- VS_PostProcess_Output output;
-
- // output position into world+view+projection space
- output.Position = input.Position;
-
- // Diffuse Uv output
- output.DiffuseUv = input.DiffuseUv;
-
- return output;
- }
-
-
- //------------------------------------------------------------------------------------------------------
- // TECHNIQUES DEFINITIONS
- //------------------------------------------------------------------------------------------------------
- technique BaseRender
- <
- int Priority = 1;
- int TechniqueIndex = 0;
- int DeviceType = HWSHADER_ONLY;
- int LightingType = INTEGRATED_LIGHTING;
- string RenderingType = "Standard";
- >
- {
- pass pass1
- {
- Texture[0] = <SourceTexture1>;
- MinFilter[0] = LINEAR;
- MagFilter[0] = LINEAR;
- MipFilter[0] = NONE; //no mipmaps.
- AddressU[0] = CLAMP;
- AddressV[0] = CLAMP;
- AlphaBlendEnable = false;
- AlphaTestEnable = false;
- FogEnable = false;
-
- CullMode = NONE;
- ZEnable = false;
- ZWriteEnable = false;
-
- VertexShader = compile vs_1_1 VSBase();
-
- PixelShader =
- asm
- {
- ps_1_1
-
- tex t0 // source texture
-
- mov r0, t0 // simple output
- };
- }
- }
-
-